/*
 * Copyright 2020 www.mytijian.com All right reserved. This software is the
 * confidential and proprietary information of www.mytijian.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with www.mytijian.com.
 */
package com.mytijian.task.client.examiner;

import com.mytijian.account.model.FileAccountImportInfo;
import com.mytijian.base.exception.ErrorInfo;
import com.mytijian.task.enums.TaskTypeEnum;
import com.mytijian.task.model.SubmitTask;
import com.mytijian.task.task.step.DataReader;
import com.mytijian.task.task.AbstractTaskProcess;
import org.springframework.stereotype.Component;

import java.lang.reflect.ParameterizedType;

@Component
public class ExaminerBatchImportTask extends AbstractTaskProcess<FileAccountImportInfo> {
    @Override
    public DataReader dataReader() {
        return new ExaminerDataReader();
    }

    @Override
    public ErrorInfo validateBeforeSubmit(SubmitTask task) {
        return null;
    }


    @Override
    public void process(FileAccountImportInfo input) {
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        Class cl = (Class) ((ParameterizedType) ExaminerBatchImportTask.class.getGenericSuperclass()).getActualTypeArguments()[0];
        System.out.println(cl);
    }
    @Override
    public boolean needProcess(FileAccountImportInfo input) {

        return true;
    }


}
